package com.supermali.entity.npc.monistor.hurt;

import com.supermali.creater.MapCreater;
import com.supermali.entity.npc.monistor.MonistorAbstract;
import com.supermali.entity.npc.person.Person;

/**
 * @project runner
 * @Date 2021/3/6
 * @Auth yangrui
 **/
public abstract class HurtAbstract extends MonistorAbstract {
    public HurtAbstract(Double x, Double y, MapCreater mapCreater) {
        super(x, y, mapCreater);
    }

    public void hurtPerson(){
        Person person = getMapCreater().getPerson();
        Person.BigStatus bigStatus = person.getBigStatus();
        if(bigStatus== Person.BigStatus.SMALL){
//            person.setRunState(Person.RunState.DIED);
        }else if(bigStatus == Person.BigStatus.BIG||bigStatus== Person.BigStatus.BIG_BULLET){
            person.setBigStatus(Person.BigStatus.SMALL);
        }
    }
}
